﻿/**
* CRL
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CRL.Core.Log
{
    #region LogItem
    [Serializable]
    public class LogItem
    {
        //internal string Path;
        internal string Id;
        public DateTime Time
        {
            get;
            set;
        } = DateTime.Now;
        public string TypeName
        {
            get;
            set;
        }
        public string Folder
        {
            get;
            set;
        }
        public string Detail
        {
            get;
            set;
        }
        
        public override string ToString()
        {
            var s = new StringBuilder(Time.ToString("yy-MM-dd HH:mm:ss fffff"));
            if (!string.IsNullOrEmpty(Detail))
            {
                s.Append("\r\n" + Detail);
            }
            //s.Append("\r\n");
            return s.ToString();
        }
    }
    #endregion
}
